import 'package:car_map/page/res/gaps.dart';
import 'package:car_map/page/routers/fluro_navigator.dart';
import 'package:car_map/page/squarepage/square_router.dart';
import 'package:car_map/widget/square_type_life_item.dart';
import 'package:flutter/material.dart';

class SquareTypeLifeRow extends StatelessWidget{

  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    String urlPath='https://www.maiche.com/news/detail/113560.html';
    String title='汽车知识';

    return Container(
      padding: EdgeInsets.all(10.0),
      decoration: BoxDecoration(
        color: Colors.white,
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          SquareTypeLifeItem(urlPath: 'square/ic_violation',title: '违章查询',colorbg: Colors.orange,callback: (){
            NavigatorUtils.push(context, SquareRouter.violationSeletePage,
                replace: false);
          },),
          Gaps.hGap10,
          SquareTypeLifeItem(urlPath: 'square/ic_car',title: '汽车知识',colorbg: Colors.green,callback: (){
            NavigatorUtils.push(context, '${SquareRouter.webScaffoldPage}?title=${Uri.encodeComponent(title)}&urlPath=${Uri.encodeComponent(urlPath)}',
                replace: false);
          },),
        ],
      ),
    );
  }

}